package test;

import java.util.Scanner;

/**
 * 计算整数中二进制1 的个数
 */
public class test09 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while (scan.hasNext()) {
            int n = scan.nextInt();
            String str = Integer.toBinaryString(n);
            str = str.replaceAll("0", "");
            System.out.println(str.length());
        }

    }
}


